package old.apiday01;

public class StringBuilderDemo {
    public static void main(String[] args) {
        String str="qwertyuiop";
        StringBuilder builder=new StringBuilder(str);
        builder.append("找个好工作");
        System.out.println(builder);
        builder.replace(4,9,"我是你爹");
        System.out.println(builder);
        builder.delete(4,9);
        System.out.println(builder);
        builder.insert(0,"插入");
        System.out.println(builder);






















        /*
        StringBuilder builder1=new StringBuilder("123abc");
        String str="abc";
        StringBuilder builder2=new StringBuilder(str);//字符串型转build
        String str2=builder2.toString();//build转字符串型

         */


    }
}
